﻿Public Class Customers

    Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSubmit.Click
        Dim retVal As Boolean = True
        Dim customerInfo As New CreateCustomer
        customerInfo.fName = txtFirstName.Text
        customerInfo.lName = txtLastName.Text
        customerInfo.phoneNo = txtPhoneNo.Text
        customerInfo.street = txtStreet.Text
        customerInfo.state = ddlState.Text
        customerInfo.city = txtCity.Text
        customerInfo.zip = txtZip.Text
        customerInfo.email = txtEmail.Text
        Dim dal As New DAL
        retVal = dal.CreateCustomer(customerInfo)
        If Not retVal Then
            MessageBox.Show("Unable to Create a Customer. Check Error Log", "Error")
        End If
    End Sub

    Private Sub btnSearch_Click(sender As System.Object, e As System.EventArgs) Handles btnSearch.Click
        Dim lName As String = txtSLname.Text
        Dim search As New CustomerSearch(lName)
        search.ShowDialog()
    End Sub

    Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click

    End Sub
End Class